#include <cstdio>
#include <bitset>
#include <cmath>
using namespace std;
typedef unsigned long long  ULL;
const ULL MAX=1000000000;
const ULL upper=2000000;
ULL Primes[upper+1];
ULL cnt=0;
bitset<MAX+1> isPrime;//0~MAX
bool isLessEqual(ULL i,ULL j,ULL N)
{
    if (i>0&&j>0&&MAX/i<j)
    {
        return false;
    }
    else
    {
        return i*j<=N;
    }
}
void eulerSieve(ULL N)
{
    isPrime.set();// assume all the numbers are prime
    isPrime[0]=0,isPrime[1]=0;// zero and one aren't prime
    for (ULL i=2; i<=N ; ++i )
    {
        if (isPrime[i])
        {
            Primes[++cnt]=i;
        }
        for (ULL j=1; j<=cnt&&isLessEqual(i,Primes[j],N) ; ++j )
        {
            isPrime[i*Primes[j]]=0;
            if (i%Primes[j]==0)
            {
                break;
            }
        }
    }
}
int main_11()
{
    eulerSieve(upper);
    printf("%llu %llu",Primes[cnt],cnt);
    return 0;
}
